package pageobjects;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class LoginPagePO {
    public WebDriver driver;
    By userName = By.xpath("/html/body/div[1]/div/div[2]/div/div/div[4]/div[1]/input");
    By passWord = By.xpath("/html/body/div[1]/div/div[2]/div/div/div[4]/div[2]/input");
    By submitBtn = By.xpath("/html/body/div[1]/div/div[2]/div/div/div[6]/button");

    /**
     * 定义构造方法,进行Drivver的传递
     */
    public LoginPagePO(WebDriver driver) {
        this.driver = driver;
    }

    /**
     * 用户名输入
     */
    public WebElement userName() {
        return driver.findElement(userName);
    }

    /**
     * 密码输入
     */
    public WebElement passWord() {
        return driver.findElement(passWord);
    }

    /**
     * 登录按钮
     */
    public WebElement submitBtn() {
        return driver.findElement(submitBtn);
    }

}
